﻿using System;
using System.Collections.Generic;
using System.Text;

namespace GeoFly
{
    /// <summary>
    /// Hargreaves method to calculat PET
    /// </summary>
    public class PETInHargreaves : PETInPM
    {
        public PETInHargreaves(double tav, double elev, double tmx, double tmn, int yr, int dn, double lat)
            : base(tav, elev, yr, dn, lat)
        {
        }
        public PETInHargreaves(double tav, double elev, double tmx, double tmn, int yr, int dn)
            : base(tav, elev, yr, dn, 33)
        {
        }


        public double PETByHarg()
        {
            //double result = 0;
            //double dtmpdif = dTmx - dTmn;
            //double dNetRad = NetRadiation();
            //double dExtRad = pslr.ExtraTerrRad();
            //if (dNetRad == -1) result = 0;
            //else
            //{
            //    if (dtmpdif < 0)
            //        result = 0;
            //    else
            //    {
            //        result = 0.0023 * dExtRad * Math.Sqrt(dTmx - dTmn) * (dTav + 17.8);
            //        //			dret = 0.0023*dExtRad*sqrt(dTmx-dTmn)*((dTmx+dTmn)/2.+17.8);
            //    }
            //}
            //return result;
            throw new Exception("");
        }
    }
}